home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 23 / CU Amiga - Super CD-ROM 23 (June 1998).iso / CUCD / Programming / OUI / include / gadgets / rcs / gadget.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  1.6 KB  |  97 lines

  1. head    1.2;
  2. access;
  3. symbols;
  4. locks
  5.     dlorre:1.2; strict;
  6. comment    @ * @;
  7.  
  8.  
  9. 1.2
  10. date    97.07.14.04.27.01;    author dlorre;    state Exp;
  11. branches;
  12. next    1.1;
  13.  
  14. 1.1
  15. date    96.08.22.02.06.07;    author dlorre;    state Exp;
  16. branches;
  17. next    ;
  18.  
  19.  
  20. desc
  21. @Oui.lib -- Object User Interface
  22. Projet créé en 1994
  23. Auteur: Dominique Lorre
  24. @
  25.  
  26.  
  27. 1.2
  28. log
  29. @*** empty log message ***
  30. @
  31. text
  32. @// $Id$
  33. #ifndef CLASS_GADGET_H
  34. #define CLASS_GADGET_H
  35.  
  36. #ifndef EXEC_TYPES_H
  37. #include <exec/types.h>
  38. #endif
  39.  
  40. #ifndef INTUITION_INTUITION_H
  41. struct Gadget ;
  42. struct Window ;
  43. #endif
  44.  
  45. #ifndef CLASS_WINDOW_H
  46. class window ;
  47. #endif
  48.  
  49. #ifndef CLASS_GADGETLIST_H
  50. class gadgetlist ;
  51. #endif
  52.  
  53. // ========================================================================
  54. // ==========================  GADGET CLASS ===============================
  55. // ========================================================================
  56.  
  57. class gadget
  58. {
  59. protected:
  60.     gadgetlist *glist ;
  61.     void (window::*gfunc)(gadget *, unsigned long, unsigned short) ;
  62. public:
  63.     long    id ;
  64.     Gadget  *gad ;
  65.     Window  *w ;
  66.     char    key ;
  67.     gadget(gadgetlist *gl, void (window::*func)(gadget *, unsigned long, unsigned short)) ;
  68.     virtual ~gadget() {}
  69.     void setfunc(void (window::*func)(gadget *, unsigned long, unsigned short)) ;
  70.     virtual void action(unsigned long, unsigned short) ;
  71.     virtual void select(BOOL sel) ;
  72.     virtual void keystroke(BOOL shifted) ;
  73.     void underkey(const char *s) ;
  74. };
  75.  
  76. inline void gadget::setfunc(void (window::*func)(gadget *, unsigned long, unsigned short))
  77. {
  78.     gfunc = func ;
  79. }
  80.  
  81.  
  82. #endif
  83. @
  84.  
  85.  
  86. 1.1
  87. log
  88. @Initial revision
  89. @
  90. text
  91. @d1 1
  92. d42 1
  93. a42 1
  94.     void underkey(STRPTR s) ;
  95. d44 6
  96. @
  97.